<div id="header">
  <div id="headertop" class="clearfix">
    <div id="topmenu">
      <a href="user.php">
        <span ng-if="cdash.user.id > 0">My CDash</span>
        <span ng-if="!cdash.user.id || cdash.user.id == 0">Login</span>
      </a>
      <a href="index.php">All Dashboards</a>
      <ng-include ng-if="cdash.user.id > 0" src="'build/views/partials/logout_@@version.html'"></ng-include>
    </div>
  </div>

  <div id="headerbottom">
    <div id="headerlogo">
      <a ng-href="{{::cdash.home}}">
        <img ng-if="cdash.logoid != 0" id="projectlogo" border="0" height="50px" ng-src="displayImage.php?imgid={{::cdash.logoid}}"/>
        <img ng-if="!cdash.logoid || cdash.logoid==0" id="projectlogo" border="0" height="50px" src="img/cdash.png?rev=2019-05-08"/>
      </a>
    </div>

    <div id="headername">
      <span class="projectname">{{::cdash.projectname}}</span>
      <span ng-if="cdash.subprojectname" id="subheadername">: {{::cdash.subprojectname}}</span>
    </div>

    <div ng-if="!cdash.hidenav" class="projectnav clearfix">
      <ul class="projectnav_controls clearfix">
        <li class="btnprev">
          <a ng-if="cdash.menu.previous"
             ng-href="{{::cdash.menu.previous}}{{::cdash.filterurl}}">Prev</a>
        </li>
        <li class="btncurr">
          <a ng-if="cdash.menu.current"
             ng-href="{{::cdash.menu.current}}{{::cdash.filterurl}}">
            Current
          </a>
        </li>
        <li class="btnnext">
          <a ng-if="cdash.menu.next"
             ng-href="{{::cdash.menu.next}}{{::cdash.filterurl}}">
            Next
          </a>
        </li>
      </ul>
    </div>

    <div id="headermenu">
      <ul id="navigation">
        <li ng-if="!cdash.noproject">
          <a ng-href="index.php?project={{::cdash.projectname_encoded}}&date={{::cdash.date}}">
            Dashboard
          </a>
          <ul>
            <li ng-if="cdash.menu.subprojects == 1">
              <a ng-href="viewSubProjects.php?project={{::cdash.projectname_encoded}}&date={{::cdash.date}}">
                SubProjects
              </a>
            </li>
            <li>
              <a ng-href="overview.php?project={{::cdash.projectname_encoded}}&date={{::cdash.date}}">
                Overview
              </a>
            </li>
            <li>
              <a ng-href="buildOverview.php?project={{::cdash.projectname_encoded}}&date={{::cdash.date}}{{::cdash.extraurl}}">
                Builds
              </a>
            </li>
            <li>
              <a ng-href="testOverview.php?project={{::cdash.projectname_encoded}}&date={{::cdash.date}}{{::cdash.extraurl}}">
                Tests
              </a>
            </li>
            <li>
              <a ng-if="cdash.parentid <= 0"
                 ng-href="queryTests.php?project={{::cdash.projectname_encoded}}&date={{::cdash.date}}{{::cdash.extraurl}}{{::cdash.extrafilterurl}}">
                Tests Query
              </a>
              <a ng-if="cdash.parentid > 0"
                 ng-href="queryTests.php?project={{::cdash.projectname_encoded}}&parentid={{::cdash.parentid}}{{::cdash.extraurl}}{{::cdash.extrafilterurl}}">
                Tests Query
              </a>
            </li>
            <li>
              <a ng-href="userStatistics.php?project={{::cdash.projectname_encoded}}&date={{::cdash.date}}">
                Statistics
              </a>
            </li>
            <li class="endsubmenu">
              <a ng-href="viewMap.php?project={{::cdash.projectname_encoded}}&date={{::cdash.date}}{{::cdash.extraurl}}">
                Sites
              </a>
            </li>
          </ul>
        </li>
        <li id="Back" ng-if="cdash.menu.back">
          <a ng-href="{{::cdash.menu.back}}{{::cdash.extrafilterurl}}"
             tooltip-popup-delay="1500"
             tooltip-append-to-body="true"
             tooltip-placement="bottom"
             uib-tooltip="Go back up one level in the hierarchy of results">Up</a>
        </li>
        <li ng-if="cdash.showcalendar">
          <a id="cal" href="" ng-click="toggleCalendar()">Calendar</a>
          <span id="date_now" style="display:none;">{{::cdash.date}}</span>
        </li>
        <li ng-if="!cdash.hidenav">
          <a href="#">Project</a>
          <ul>
            <li>
              <a ng-href="{{::cdash.home}}">Home</a>
            </li>
            <li>
              <a ng-href="{{::cdash.documentation}}">Documentation</a>
            </li>
            <li>
              <a ng-href="{{::cdash.vcs}}">Repository</a>
            </li>
            <li ng-class="::{endsubmenu: cdash.projectrole}">
              <a ng-href="{{::cdash.bugtracker}}">Bug Tracker</a>
            </li>
            <li ng-if="!cdash.projectrole" class="endsubmenu">
              <a ng-href="subscribeProject.php?projectid={{::cdash.projectid}}">Subscribe</a>
            </li>
          </ul>
        </li>
        <li ng-if="cdash.user.admin == 1 && !cdash.noproject" id="admin">
          <a href="#">Settings</a>
          <ul>
            <li>
              <a ng-href="project/{{::cdash.projectid}}/edit">
                Project
              </a>
            </li>
            <li>
              <a ng-href="manageProjectRoles.php?projectid={{::cdash.projectid}}">
                Users
              </a>
            </li>
            <li>
              <a ng-href="manageBuildGroup.php?projectid={{::cdash.projectid}}">
                Groups
              </a>
            </li>
            <li>
              <a ng-href="manageCoverage.php?projectid={{::cdash.projectid}}">
                Coverage
              </a>
            </li>
            <li>
              <a ng-href="manageBanner.php?projectid={{::cdash.projectid}}">
                Banner
              </a>
            </li>
            <li>
              <a ng-href="manageMeasurements.php?projectid={{::cdash.projectid}}">
                Measurements
              </a>
            </li>
            <li>
              <a ng-href="manageSubProject.php?projectid={{::cdash.projectid}}">
                SubProjects
              </a>
            </li>
            <li class="endsubmenu">
              <a ng-href="manageOverview.php?projectid={{::cdash.projectid}}">
                Overview
              </a>
            </li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
  <div id="calendar"/>
</div>


<img id="spinner" src="img/loading.gif" ng-show="loading" />

<div ng-show="::cdash.error">
  <b>Error: {{::cdash.error}}</b>
</div>
<div ng-show="::cdash.warning">
  <b>Warning: {{::cdash.warning}}</b>
</div>
